package com.luweijie.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.luweijie.entity.ShzwActivity;
import com.luweijie.entity.po.ShzwActivityPo;
import com.luweijie.entity.vo.Result;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 * 优惠券信息及规则表 服务类
 * </p>
 *
 * @author luweijie
 * @since 2020-06-03
 */
public interface IShzwActivityService extends IService<ShzwActivityPo> {
    /**
     * 优惠活动分页查询
     * 包括上架下架和过期
     * @param page 分页参数
     * @param status 物品状态
     * */
    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRES_NEW)
    IPage<ShzwActivityPo> query(Page page,String status);
    /***
     * 添加优惠活动
     */
    boolean add(ShzwActivityPo shzwActivityPo);
    /**
     * 更新优惠活动
     * */
    boolean updata(ShzwActivityPo shzwActivityPo);
}
